package na.learn.java.threads;

public class testMyTask {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		CompositeTime cTime = new CompositeTime(500l, System.currentTimeMillis());
		CompositeValue cValue = new CompositeValue(new Integer(11), cTime);
		System.out.println(System.currentTimeMillis());
		Thread t1 = new Thread(new MyTask(cValue));
		t1.setDaemon(true);
		t1.start();
		System.out.println(System.currentTimeMillis());
		CompositeValue cValue2 = new CompositeValue(new Integer(44), cTime);
		Thread t2 = new Thread(new MyTask(cValue2));
		t2.setDaemon(true);
		t2.start();
		
		System.out.println(System.currentTimeMillis());
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		System.out.println("Awake !!!");
		


	}

}
